(user_lib/srfray.c:271)
Prototype:
void IntrSrfRayFreePreprocess(VoidPtr Handle)
Description:
Releases the pre processed data structed created by the function
IntrSrfRayPreprocessSrf.
Parameters:
Handle: | As returned by IntrSrfRayPreprocessSrf to release
|
---|
Returned Value:
Keywords:
ray surface intersection
(user_lib/srfray.c:59)
Prototype:
VoidPtr IntrSrfRayPreprocessSrf(CagdSrfStruct *Srf, int FineNess)
Description:
Preprocess a surface for fast computation of ray-surface intersection.
Returns NULL if fails, otherwise a pointer to preprocessed data structure.
The preprocessed data is in fact a hierarchy of bounding boxes extracted
while the surface is being polygonized.
Parameters:
Srf: | To preprocess.
|
---|
FineNess: | Control on accuracy, the higher the finer.
The surface will be subdivided into approximately FineNess
regions in each of the two parametric directions.
|
---|
Returned Value:
VoidPtr: A handle on the preprocessed data, NULL otherwise.
|
---|
Keywords:
ray surface intersection
(user_lib/srfray.c:304)
Prototype:
CagdBType IntrSrfRayTestRay(VoidPtr Handle,
CagdPType RayOrigin,
CagdVType RayDir,
CagdUVType InterUV)
Description:
Computes the first intersection of a given ray with the given surface,
if any. If TRUE is returned, the InterUV is updated to the interesection.
Parameters:
Handle: | As returned by IntrSrfRayPreprocessSrf to release
|
---|
RayOrigin: | tarting point of ray.
|
---|
RayDir: | Direction of ray.
|
---|
Returned Value:
CagdBType: TRUE if found intersection, FALSE otherwise.
|
---|
Keywords:
ray surface intersection
(user_lib/srf_cntr.c:45)
Prototype:
IPPolygonStruct *UserCntrSrfWithPlane(CagdSrfStruct *Srf,
PlaneType Plane,
RealType FineNess)
Description:
Computes the intersection of a freeform surface and a plane by
approximating the surface by polygons and calling Boolean tools.
If PSrfObj is a scalar surface then it is promoted first into a
3D Euclidean surface with UV as YZ coordinates (and X has scalar field).
Parameters:
Srf: | To approximate its intersection with the given plane.
|
---|
Plane: | To intersect with the given surface. If NULL the XY plane is
used.
|
---|
Fineness: | Control of polygonal approximation of surface. See
IritSurface2Polygons function.
|
---|
Returned Value:
IPPolygonStruct *: A list of polylines approximating the contour.
|
---|
See Also:
UserCntrScalarFieldAndEval
Keywords:
contouring
(user_lib/user_err.c:40)
Prototype:
char *UserDescribeError(UserFatalErrorType ErrorNum)
Description:
Returns a string describing a the given error. Errors can be raised by
any member of this user library as well as other users. Raised error will
cause an invokation of UserFatalError function which decides how to handle
this error. UserFatalError can for example, invoke this routine with the
error type, print the appropriate message and quit the program.
Parameters:
ErrorNum: | Type of the error that was raised.
|
---|
Returned Value:
char *: A string describing the error type.
|
---|
Keywords:
error handling
(user_lib/user_ftl.c:28)
Prototype:
void UserFatalError(UserFatalErrorType ErrID)
Description:
Trap User_lib errors right here. Provides a default error handler for the
user library. Gets an error description using UserDescribeError, prints it
and exit the program using exit.
Parameters:
ErrID: | Error type that was raised.
|
---|
Returned Value:
Keywords:
error handling